<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>


    <title>优惠券</title>

    <link rel="shortcut icon" href="favicon.ico"/>
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet"/>
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet"/>
    <link href="css/plugins/iCheck/custom.css" rel="stylesheet"/>
    <link href="css/animate.css" rel="stylesheet"/>
    <link href="css/style.css?v=4.1.0" rel="stylesheet"/>
    <link rel="shortcut icon" href="favicon.ico"/>
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet"/>
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet"/>
    <link href="css/animate.css" rel="stylesheet"/>
    <link rel="stylesheet" type="text/css" href="css/plugins/simditor/simditor.css" />
    <link href="css/style.css?v=4.1.0" rel="stylesheet"/>

    <link rel="shortcut icon" href="favicon.ico"/>
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet"/>
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet"/>
    <link href="css/animate.css" rel="stylesheet"/>
    <link rel="stylesheet" type="text/css" href="css/plugins/webuploader/webuploader.css"/>
    <link rel="stylesheet" type="text/css" href="css/demo/webuploader-demo.css"/>
    <link href="css/style.css?v=4.1.0" rel="stylesheet"/>


</head>

<body class="gray-bg">
<div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h1>优惠券新增 <small></small></h1>
                <div class="ibox-tools">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                    <a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
                        <i class="fa fa-wrench"></i>
                    </a>
                    <a class="close-link">
                        <i class="fa fa-times"></i>
                    </a>
                </div>
            </div>
            <div class="ibox-content">
                <form method="post" action="wl_coupon_Update" class="form-horizontal" enctype="multipart/form-data">
                    <div class="form-group">

                        <!-- Id -->
                        <input required th:value="${wl_coupon_Object.id}" type="text" name="id" class="form-control" style="width: 300px;border-radius: 4%;display: none;"/><br/>

                        <label class="col-sm-2 control-label">优惠券名称：</label>
                        <input required th:value="${wl_coupon_Object.couponname}" type="text" name="couponname" class="form-control" style="width: 300px;border-radius: 4%;"/><br/>

						<label class="col-sm-2 control-label">优惠券类型：</label>
                        <div class="checkbox i-checks" th:if="${wl_coupon_Object.coupontype=='1'}">
                            <label>
                                <input type="radio" value="1"  name="coupontype" checked="checked"/> <i></i> 红包</label>
                            <label>
                                <input type="radio" value="2"  name="coupontype"/> <i></i> 满减券</label>
                            <label>
                                <input type="radio" value="3"  name="coupontype"/> <i></i> 折扣券</label>
                        </div>
                        <div class="checkbox i-checks" th:if="${wl_coupon_Object.coupontype=='2'}">
                            <label>
                                <input type="radio" value="1"  name="coupontype"/> <i></i> 红包</label>
                            <label>
                                <input type="radio" value="2"  name="coupontype" checked="checked"/> <i></i> 满减券</label>
                            <label>
                                <input type="radio" value="3"  name="coupontype"/> <i></i> 折扣券</label>
                        </div>
                        <div class="checkbox i-checks" th:if="${wl_coupon_Object.coupontype=='3'}">
                            <label>
                                <input type="radio" value="1"  name="coupontype"/> <i></i> 红包</label>
                            <label>
                                <input type="radio" value="2"  name="coupontype"/> <i></i> 满减券</label>
                            <label>
                                <input type="radio" value="3"  name="coupontype" checked="checked"/> <i></i> 折扣券</label>
                        </div>
                        <br>

                        <label class="col-sm-2 control-label">优惠券编码：</label>
                        <input required th:value="${wl_coupon_Object.couponcode}" name="couponCode" class="form-control" style="width: 300px;border-radius: 4%;"/><br/>

                        <label class="col-sm-2 control-label">适用商品类：</label>
                        <input class="form-control" type="text" th:if="${wl_coupon_Object.wl_category==null}" style="width: 300px;border-radius: 4%;" th:value="全部"/>
                        <input class="form-control" type="text" th:if="${wl_coupon_Object.wl_category!=null}" style="width: 300px;border-radius: 4%;" th:value="${wl_coupon_Object.wl_category.catename}"/>
                        <br/>

						<label class="col-sm-2 control-label">满减金额(元)：</label>
                        <input required th:value="${wl_coupon_Object.fullmoney}" type="number" min="0" name="fullmoney" class="form-control" style="width: 300px;border-radius: 4%;"/><br/>

						<label class="col-sm-2 control-label">优惠金额(元)：</label>
                        <input required th:value="${wl_coupon_Object.discountmoney}" type="number" min="0" name="discountmoney" class="form-control" style="width: 300px;border-radius: 4%;"/><br/>

						<label class="col-sm-2 control-label">结束时间：</label>
                        <input id="riqi"  onblur="inputOnBlur();" th:value="${#dates.format(wl_coupon_Object.expiretime,'yyyy-MM-dd')}" title="请输入：yyyy-MM-dd格式" pattern="^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$" required type="text" name="expiretime" class="form-control" style="width: 300px;border-radius: 4%;"/><br/>

                        <label class="col-sm-2 control-label">用户领取优惠券后多少天过期：</label>
                        <input required type="number" th:value="${wl_coupon_Object.expiredays}" name="expiredays" class="form-control" style="width: 300px;border-radius: 4%;"/><br/>

						<label class="col-sm-2 control-label">优惠券数量：</label>
                        <input required type="number" th:value="${wl_coupon_Object.quantity}" min="0" name="quantity" class="form-control" style="width: 300px;border-radius: 4%;"/><br/>

                        <label class="col-sm-2 control-label">是否在领卷中心显示：</label>
                        <div class="form-group">
                            <div class="checkbox i-checks" th:if="${wl_coupon_Object.couponcenter==0}" >
                                <label>
                                    <input type="radio" value="0"  name="couponcenter" checked="checked"/> <i></i> 不在领券中心显示</label>
                                <label>
                                    <input type="radio" value="1"  name="couponcenter" /> <i></i> 在领券中心显示</label>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="checkbox i-checks" th:if="${wl_coupon_Object.couponcenter==1}">
                                <label>
                                    <input type="radio" value="0"  name="couponcenter" /> <i></i> 不在领券中心显示</label>
                                <label>
                                    <input type="radio" value="1"  name="couponcenter" checked="checked"/> <i></i> 在领券中心显示</label>
                            </div>
                        </div>
                        <br/>
						
						<label class="col-sm-2 control-label">请选择状态：</label>
                        <div class="form-group">
                            <div class="checkbox i-checks" th:if="${wl_coupon_Object.status=='1'}">
                                <label>
                                    <input type="radio" value="1"  name="status" checked="checked"/> <i></i> 有效</label>
                                <label>
                                    <input type="radio" value="0"  name="status" /> <i></i> 无效</label>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="checkbox i-checks" th:if="${wl_coupon_Object.status=='0'}">
                                <label>
                                    <input type="radio" value="1"  name="status" /> <i></i> 有效</label>
                                <label>
                                    <input type="radio" value="0"  name="status"  checked="checked"/> <i></i> 无效</label>
                            </div>
                        </div>

                        <input type="submit" class="btn btn-primary" value="保存信息"/>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="js/jquery.min.js?v=2.1.4"></script>
<script src="js/bootstrap.min.js?v=3.3.6"></script>

<script>
    function inputOnBlur() {
        var riqi = new Date(document.getElementById('riqi').value).getTime();
        var now = new Date().getTime();
        if (riqi < now) {
            alert("结束时间必须大于当前日期！");
        }
    }
</script>


<!-- 自定义js -->
<script src="js/content.js?v=1.0.0"></script>

<!-- simditor -->
<script type="text/javascript" src="js/plugins/simditor/module.js"></script>
<script type="text/javascript" src="js/plugins/simditor/uploader.js"></script>
<script type="text/javascript" src="js/plugins/simditor/hotkeys.js"></script>
<script type="text/javascript" src="js/plugins/simditor/simditor.js"></script>
<script type="text/javascript">
    // 添加全局站点信息
    var BASE_URL = 'js/plugins/webuploader';
</script>
<script src="js/plugins/webuploader/webuploader.min.js"></script>

<script src="js/demo/webuploader-demo.js"></script>

<!-- iCheck -->
<script src="js/plugins/iCheck/icheck.min.js"></script>
<script>

    function quchu(id){
        var asd = $("#"+id+"").parent().parent().attr("id");
        $("#"+asd+"").html("");
    }

    $(document).ready(function () {
        var editor = new Simditor({
            textarea: $('#editor'),
            defaultImage: 'img/a9.jpg'
        });
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
        $('.summernote').summernote({
            lang: 'zh-CN'
        });

    });
    var edit = function () {
        $("#eg").addClass("no-padding");
        $('.click2edit').summernote({
            lang: 'zh-CN',
            focus: true
        });
    };
    var save = function () {
        $("#eg").removeClass("no-padding");
        var aHTML = $('.click2edit').code(); //save HTML If you need(aHTML: array).
        $('.click2edit').destroy();
    };
</script>

<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
<!--统计代码，可删除-->





</body>

</html>
